import React from 'react';
import './index.less'
import Title from 'components/title'
import DragDiv from 'pages/Home/dragDiv';
import { Space } from 'antd';
import { ISettings } from '../types';
interface IProps {
    settings: ISettings;
    setSettings: Function;
    status: string
}
export default React.memo((props: IProps) => {
    return (
        <Space className="preview" direction="vertical" size={20}>
            <Title text="捕获效果预览"/>
            <section className="preview-main">
                <canvas id="preview" width="720" height="480" className="canvas"></canvas>
                <DragDiv {...props} />
            </section>
            <canvas id="result" width={props.settings.width} height={props.settings.height} style={{ display: 'block' }} />
        </Space>
    )
})